﻿<Window x:Class="CPPEI.Coolzon.Designer.Views.PublishDataSourceToServerWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.Designer.Views"
        mc:Ignorable="d"
        Title="发布数据源到服务器" Height="350" Width="700" WindowStartupLocation="CenterScreen" Loaded="Window_Loaded"
          Style="{DynamicResource WindowStyle}">
    <!--<Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/CPPEI.Coolzon.Designer.Views;component/CommonStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>-->
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Text="数据源:" Margin="15,0,0,0" FontSize="16"/>
        <ListView Grid.Row="1"  x:Name="_ctlListView" AlternationCount="2" >
            <ListView.View >
                <GridView>
                    <GridView.Columns>
                        <GridViewColumn>
                            <GridViewColumn.HeaderTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <TextBlock HorizontalAlignment="Center" Width="Auto" Margin="2" Text="名称"/>
                                    </Grid>
                                </DataTemplate>
                            </GridViewColumn.HeaderTemplate>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate DataType="local:PublishDataSourceToServerModel">
                                    <StackPanel Orientation="Horizontal" Margin="0,3,0,3">
                                        <CheckBox IsChecked="{Binding Path=IsChecked, Mode=TwoWay}" Margin="3,0,0,0"/>
                                        <TextBlock Text="{Binding Path=Name}" Margin="5,0,0,0" ></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn>
                            <GridViewColumn.HeaderTemplate>
                                <DataTemplate >
                                    <Grid>
                                        <TextBlock HorizontalAlignment="Center" Width="Auto"  Margin="2" Text="版本" />
                                    </Grid>
                                </DataTemplate>
                            </GridViewColumn.HeaderTemplate>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate DataType="local:PublishDataSourceToServerModel">
                                    <StackPanel Orientation="Horizontal" Margin="0,3,0,3">
                                        <TextBlock Text="{Binding Path=RTVersion}" Margin="5,0,0,0" ></TextBlock>
                                    </StackPanel>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn>
                            <GridViewColumn.HeaderTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <TextBlock HorizontalAlignment="Center" Width="Auto"  Margin="2" Text="发布版本"/>
                                    </Grid>
                                </DataTemplate>
                            </GridViewColumn.HeaderTemplate>
                            <GridViewColumn.CellTemplate>
                                <DataTemplate DataType="local:PublishDataSourceToServerModel">
                                    <TextBlock Text="{Binding Path=PublishedVersion}" Margin="10"></TextBlock>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="发布时间">
                            <GridViewColumn.CellTemplate>
                                <DataTemplate DataType="local:PublishDataSourceToServerModel">
                                    <TextBlock HorizontalAlignment="Center"  Text="{Binding Path=PublishedTime}" Width="Auto" Margin="10"></TextBlock>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView.Columns>
                </GridView>
            </ListView.View>
        </ListView>
        <Grid Grid.Row="2">
            <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Content="发布" Margin="0,0,20,0" Click="Button_Click" />
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}"  Name="cancel" Content="取消" Margin="20,0,0,0" Click="cancel_Click"></Button>
            </StackPanel>
        </Grid>
    </Grid>
</Window>
